
import java.util.ArrayList;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Comedy Option
 */
public class Floor {
    
    private ArrayList<Room> rooms;
    private String floorName;
    
    public Floor(String initFloor){
        floorName = initFloor;
        rooms = new ArrayList<Room>();
    }
    
    public Room getRoom(String roomName){
        for(int i = 0; i < rooms.size(); i++){
            if (rooms.get(i).getName().compareTo(roomName) == 0){
                return rooms.get(i);
            }   
        }
        return null;
    }
    
    public void addRoom(Room newRoom){
        rooms.add(newRoom);
    }
    public void removeRoom(Room toRemove){
        rooms.remove(toRemove);
    }
    
    public String getName(){
        return floorName;
    }
}
